package com.atguigu.tingshu.album.api;

import com.atguigu.tingshu.common.rabbit.service.RabbitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: atguigu
 * @create: 2025-05-30 14:39
 */
@RestController
@RequestMapping("/api/album")
public class TestController {

    @Autowired
    private RabbitService rabbitService;

    @GetMapping("/sendMqMsg/{exchangeName}")
    public void sendMqMsg(@PathVariable String exchangeName) {
        rabbitService.sendMessage(exchangeName, "routing.order", "hello");
    }
}
